import request from "@/util/request";

enum API{
    SHARE_TAG = "/share/tag",
    SHARE_TAG_PAGE = "/share/tag/page",
    TAGE_LIST = "/share/tag/list",
}
export function reqCreateTag(tag: any){
    return request({
        url: API.SHARE_TAG,
        method: "post",
        data: tag
    });
}
export function reqGetTagList(query: any) {
    return request({
        url: API.TAGE_LIST,
        method: "get",
        params: query
    });
}
export function reqUpdateTag(tag: any) {
    return request({
        url: API.SHARE_TAG,
        method: "put",
        data: tag
    });
}
export function reqDeleteTag(id: number) {
    return request({
        url: API.SHARE_TAG + "/" + id,
        method: "delete"
    });
}
export function reqGetTag(id: number) {
    return request({
        url: API.SHARE_TAG + "/" + id,
        method: "get"
    });
}
export function reqGetTagPage(query: any) {
    return request({
        url: API.SHARE_TAG_PAGE,
        method: "get",
        params: query
    });
}
